package p270jp.pxv.android.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import androidx.databinding.DataBindingUtil;
import p090d0.C2518n;
import p144f1.C3017s;
import p270jp.pxv.android.R;
import p270jp.pxv.android.legacy.model.PixivNovel;
import p307l9.EdgeTreatment;
import p314lg.ViewNovelThumbnailBinding;
import p374nm.BaseMuteLayout;
import p677zi.PixivImageLoader;

/* renamed from: jp.pxv.android.view.NovelThumbnailView */
/* loaded from: classes2.dex */
public class NovelThumbnailView extends BaseMuteLayout {

    /* renamed from: b */
    public ViewNovelThumbnailBinding f19618b;

    /* renamed from: c */
    public final PixivImageLoader f19619c = (PixivImageLoader) C2518n.m7641d(PixivImageLoader.class);

    public NovelThumbnailView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    @Override // p374nm.BaseMuteLayout
    /* renamed from: a */
    public View mo3337a() {
        ViewNovelThumbnailBinding saVar = (ViewNovelThumbnailBinding) DataBindingUtil.m11370c(LayoutInflater.from(getContext()), R.layout.view_novel_thumbnail, this, false);
        this.f19618b = saVar;
        return saVar.f2666e;
    }

    public void setImage(String str) {
        this.f19619c.m59g(getContext(), str, this.f19618b.f22258q);
    }

    public void setNovel(PixivNovel pixivNovel) {
        EdgeTreatment.m3909i(pixivNovel);
        if (C3017s.m6471e(pixivNovel)) {
            setMuteCoverVisibility(0);
            return;
        }
        setMuteCoverVisibility(8);
        this.f19618b.f22259r.setText(pixivNovel.title);
    }
}
